<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>猫猫大学 - 首页</title>
    <!-- Bootstrap CSS -->
    <link href="${pageContext.request.contextPath}/resources/bootstrap5/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" rel="stylesheet">
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f8f9fa;
        }

        /* 导航栏样式 */
        .navbar {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            padding: 0.8rem 0;
        }

        .navbar-brand {
            font-size: 1.8rem;
            font-weight: bold;
            color: white !important;
            display: flex;
            align-items: center;
        }

        .navbar-brand img {
            width: 40px;
            height: 40px;
            margin-right: 12px;
            border-radius: 50%;
        }

        .navbar-nav .nav-link {
            color: rgba(255,255,255,0.9) !important;
            font-weight: 500;
            margin: 0 10px;
            transition: all 0.3s ease;
            border-radius: 20px;
            padding: 8px 16px !important;
        }

        .navbar-nav .nav-link:hover {
            color: white !important;
            background-color: rgba(255,255,255,0.1);
            transform: translateY(-2px);
        }

        /* 轮播图样式 */
        .hero-carousel {
            margin-top: 76px;
        }

        .carousel-item {
            height: 600px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-color: #f8f9fa;
        }

        .carousel-item:nth-child(1) {
            background-image: url('${pageContext.request.contextPath}/resources/images/1.jpg');
        }

        .carousel-item:nth-child(2) {
            background-image: url('${pageContext.request.contextPath}/resources/images/2.jpg');
        }

        .carousel-item:nth-child(3) {
            background-image: url('${pageContext.request.contextPath}/resources/images/3.jpg');
        }

        .carousel-item::before {
            display: none;
        }

        /* 轮播图控制按钮样式 */
        .carousel-control-prev,
        .carousel-control-next {
            width: 8%;
            opacity: 0.8;
            transition: opacity 0.3s ease;
        }

        .carousel-control-prev:hover,
        .carousel-control-next:hover {
            opacity: 1;
        }

        .carousel-control-prev-icon,
        .carousel-control-next-icon {
            width: 30px;
            height: 30px;
            background-color: rgba(0,0,0,0.5);
            border-radius: 50%;
        }

        .carousel-indicators {
            margin-bottom: 2rem;
        }

        .carousel-indicators [data-bs-target] {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            margin: 0 4px;
            background-color: rgba(255,255,255,0.5);
            border: 2px solid rgba(255,255,255,0.8);
        }

        .carousel-indicators .active {
            background-color: white;
        }

        .carousel-caption {
            display: none;
        }

        .btn-hero {
            background: linear-gradient(45deg, #ff6b6b, #ee5a24);
            border: none;
            padding: 12px 30px;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 30px;
            color: white;
            text-decoration: none;
            display: inline-block;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255,107,107,0.3);
        }

        .btn-hero:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(255,107,107,0.4);
            color: white;
        }

        /* 快速导航 */
        .quick-nav {
            padding: 60px 0;
            background: white;
        }

        .quick-nav-item {
            text-align: center;
            padding: 30px 20px;
            margin-bottom: 30px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
            border: 1px solid #f0f0f0;
        }

        .quick-nav-item:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.15);
            border-color: #667eea;
        }

        .quick-nav-item i {
            font-size: 3rem;
            margin-bottom: 20px;
            background: linear-gradient(45deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .quick-nav-item h4 {
            color: #333;
            font-weight: 600;
            margin-bottom: 15px;
        }

        .quick-nav-item p {
            color: #666;
            margin-bottom: 0;
        }

        .quick-nav-item a {
            text-decoration: none;
            color: inherit;
        }

        /* 新闻公告区域 */
        .news-section {
            padding: 60px 0;
            background: #f8f9fa;
        }

        .section-title {
            text-align: center;
            margin-bottom: 50px;
        }

        .section-title h2 {
            font-size: 2.5rem;
            font-weight: bold;
            color: #333;
            margin-bottom: 15px;
        }

        .section-title .subtitle {
            font-size: 1.1rem;
            color: #666;
        }

        .news-card {
            background: white;
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 5px 20px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
            margin-bottom: 30px;
            border: 1px solid #f0f0f0;
        }

        .news-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(0,0,0,0.15);
        }

        .news-card-body {
            padding: 25px;
        }

        .news-date {
            color: #667eea;
            font-size: 0.9rem;
            font-weight: 500;
            margin-bottom: 10px;
        }

        .news-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: #333;
            margin-bottom: 15px;
            line-height: 1.4;
        }

        .news-excerpt {
            color: #666;
            font-size: 0.95rem;
            line-height: 1.6;
        }

        /* 统计数据 */
        .stats-section {
            padding: 80px 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
        }

        .stat-item {
            text-align: center;
            padding: 20px;
        }

        .stat-number {
            font-size: 3rem;
            font-weight: bold;
            margin-bottom: 10px;
            display: block;
        }

        .stat-label {
            font-size: 1.1rem;
            opacity: 0.9;
        }

        /* 页脚 */
        .footer {
            background: #2c3e50;
            color: white;
            padding: 40px 0 20px;
        }

        .footer h5 {
            color: white;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .footer a {
            color: #bdc3c7;
            text-decoration: none;
            line-height: 2;
            transition: color 0.3s ease;
        }

        .footer a:hover {
            color: #667eea;
        }

        .footer-bottom {
            border-top: 1px solid #34495e;
            margin-top: 30px;
            padding-top: 20px;
            text-align: center;
            color: #bdc3c7;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .carousel-item {
                height: 300px;
            }
            
            .carousel-caption {
                padding: 30px 15px;
                max-width: 90%;
            }
            
            .carousel-caption h1 {
                font-size: 2.5rem;
                margin-bottom: 1rem;
            }
            
            .carousel-caption p {
                font-size: 1.1rem;
                margin-bottom: 1.5rem;
            }
            
            .quick-nav-item {
                margin-bottom: 20px;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark fixed-top">
        <div class="container">
            <a class="navbar-brand" href="#">
                <img src="${pageContext.request.contextPath}/resources/images/logo.png" alt="猫猫大学">
                猫猫大学
            </a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="#home">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#about">学校概况</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#academics">教学科研</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#news">新闻公告</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="${pageContext.request.contextPath}/user/login">教务处</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- 轮播图 -->
    <div id="heroCarousel" class="carousel slide hero-carousel" data-bs-ride="carousel">
        <div class="carousel-indicators">
            <button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="0" class="active"></button>
            <button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="1"></button>
            <button type="button" data-bs-target="#heroCarousel" data-bs-slide-to="2"></button>
        </div>
        <div class="carousel-inner">
            <div class="carousel-item active">
            </div>
            <div class="carousel-item">
            </div>
            <div class="carousel-item">
            </div>
        </div>
        <button class="carousel-control-prev" type="button" data-bs-target="#heroCarousel" data-bs-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="visually-hidden">Previous</span>
        </button>
        <button class="carousel-control-next" type="button" data-bs-target="#heroCarousel" data-bs-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="visually-hidden">Next</span>
        </button>
    </div>

    <!-- 快速导航 -->
    <section class="quick-nav" id="services">
        <div class="container">
            <div class="section-title">
                <h2>快速导航</h2>
                <p class="subtitle">便民服务，一键直达</p>
            </div>
            <div class="row">
                <div class="col-lg-3 col-md-6">
                    <div class="quick-nav-item">
                        <a href="${pageContext.request.contextPath}/user/login">
                            <i class="bi bi-building"></i>
                            <h4>教务管理</h4>
                            <p>学生选课、成绩查询、课程安排</p>
                        </a>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="quick-nav-item">
                        <i class="bi bi-book"></i>
                        <h4>图书馆</h4>
                        <p>图书借阅、学术资源、在线数据库</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="quick-nav-item">
                        <i class="bi bi-people"></i>
                        <h4>学生服务</h4>
                        <p>宿舍管理、奖助学金、心理咨询</p>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="quick-nav-item">
                        <i class="bi bi-globe"></i>
                        <h4>国际交流</h4>
                        <p>留学项目、国际合作、交换生</p>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 新闻公告 -->
    <section class="news-section" id="news">
        <div class="container">
            <div class="section-title">
                <h2>新闻公告</h2>
                <p class="subtitle">最新动态，及时了解</p>
            </div>
            <div class="row">
                <div class="col-lg-4 col-md-6">
                    <div class="news-card">
                        <div class="news-card-body">
                            <div class="news-date">2024年12月26日</div>
                            <h5 class="news-title">猫猫大学2025年春季学期开学通知</h5>
                            <p class="news-excerpt">根据学校教学安排，2025年春季学期将于2月24日正式开学，请各位同学做好返校准备...</p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="news-card">
                        <div class="news-card-body">
                            <div class="news-date">2024年12月25日</div>
                            <h5 class="news-title">关于期末考试安排的通知</h5>
                            <p class="news-excerpt">本学期期末考试将于1月8日至1月15日进行，请同学们合理安排复习时间，诚信考试...</p>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 col-md-6">
                    <div class="news-card">
                        <div class="news-card-body">
                            <div class="news-date">2024年12月24日</div>
                            <h5 class="news-title">猫猫大学获得国家级教学成果奖</h5>
                            <p class="news-excerpt">我校计算机学院的"创新型人才培养模式改革"项目荣获国家级教学成果二等奖...</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 统计数据 -->
    <section class="stats-section">
        <div class="container">
            <div class="row">
                <div class="col-lg-3 col-md-6">
                    <div class="stat-item">
                        <span class="stat-number">28,000+</span>
                        <div class="stat-label">在校学生</div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="stat-item">
                        <span class="stat-number">2,100+</span>
                        <div class="stat-label">教职工</div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="stat-item">
                        <span class="stat-number">120+</span>
                        <div class="stat-label">本科专业</div>
                    </div>
                </div>
                <div class="col-lg-3 col-md-6">
                    <div class="stat-item">
                        <span class="stat-number">75年</span>
                        <div class="stat-label">办学历史</div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <div class="row">
                <div class="col-lg-4 col-md-6">
                    <h5>联系我们</h5>
                    <p><i class="bi bi-geo-alt"></i> 地址：中国·某省某市猫猫大学路123号</p>
                    <p><i class="bi bi-telephone"></i> 电话：+86-400-123-4567</p>
                    <p><i class="bi bi-envelope"></i> 邮箱：info@catuniversity.edu.cn</p>
                </div>
                <div class="col-lg-2 col-md-6">
                    <h5>快速链接</h5>
                    <p><a href="#">学校概况</a></p>
                    <p><a href="#">招生信息</a></p>
                    <p><a href="#">就业服务</a></p>
                    <p><a href="#">校友网</a></p>
                </div>
                <div class="col-lg-2 col-md-6">
                    <h5>学术资源</h5>
                    <p><a href="#">图书馆</a></p>
                    <p><a href="#">学术期刊</a></p>
                    <p><a href="#">科研成果</a></p>
                    <p><a href="#">学术会议</a></p>
                </div>
                <div class="col-lg-4 col-md-6">
                    <h5>关注我们</h5>
                    <p>获取最新校园资讯和动态</p>
                    <div class="d-flex gap-3 mt-3">
                        <i class="bi bi-wechat" style="font-size: 1.5rem;"></i>
                        <i class="bi bi-sina-weibo" style="font-size: 1.5rem;"></i>
                        <i class="bi bi-tencent-qq" style="font-size: 1.5rem;"></i>
                    </div>
                </div>
            </div>
            <div class="footer-bottom">
                <p>&copy; 2024 猫猫大学. 保留所有权利. | <a href="#">隐私政策</a> | <a href="#">使用条款</a></p>
            </div>
        </div>
    </footer>

    <!-- Bootstrap JavaScript -->
    <script src="${pageContext.request.contextPath}/resources/bootstrap5/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                const target = document.querySelector(this.getAttribute('href'));
                if (target) {
                    target.scrollIntoView({
                        behavior: 'smooth',
                        block: 'start'
                    });
                }
            });
        });

        // 导航栏滚动效果
        window.addEventListener('scroll', function() {
            const navbar = document.querySelector('.navbar');
            if (window.scrollY > 50) {
                navbar.style.backgroundColor = 'rgba(102, 126, 234, 0.95)';
            } else {
                navbar.style.backgroundColor = 'transparent';
            }
        });

        // 数字动画
        function animateNumbers() {
            const stats = document.querySelectorAll('.stat-number');
            stats.forEach(stat => {
                const target = parseInt(stat.textContent.replace(/[^\d]/g, ''));
                let current = 0;
                const increment = target / 100;
                const timer = setInterval(() => {
                    current += increment;
                    if (current >= target) {
                        current = target;
                        clearInterval(timer);
                    }
                    stat.textContent = Math.floor(current).toLocaleString() + (stat.textContent.includes('+') ? '+' : '') + (stat.textContent.includes('年') ? '年' : '');
                }, 20);
            });
        }

        // 当统计区域进入视口时触发动画
        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    animateNumbers();
                    observer.unobserve(entry.target);
                }
            });
        });

        observer.observe(document.querySelector('.stats-section'));

        // 初始化轮播图
        const carousel = new bootstrap.Carousel(document.querySelector('#heroCarousel'), {
            interval: 5000, // 5秒自动切换
            wrap: true,     // 循环轮播
            pause: 'hover'  // 鼠标悬停时暂停
        });
    </script>
</body>
</html>
